import React from 'react'
import { useSelector, useDispatch } from 'react-redux'
export default function Index() {
  const state = useSelector((state) => state.toJS())
  const dispatch = useDispatch()
  console.log(state)
  return (
    <div>
      <div>计数:{state.reducer.obj.count}</div>
      <button onClick={() => dispatch({ type: 'incr', payload: 1 })}>
        +1
      </button>
    </div>
  )
}
